Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SW-1658] Allow body frame to be root of TF tree #536

Merged
merged 4 commits into from
Dec 18, 2024

Conversation

khughes-bdai
Copy link
Collaborator

@khughes-bdai khughes-bdai commented Dec 16, 2024

Change Overview

The goal of this PR is to allow the body frame to be the root of the tf tree, in case you want to broadcast your own custom odometry transform to "body". Currently that's not possible as body always has either odom or vision as a parent, and a tf frame cannot have more than two parents.

  • adds new parameter tf_root to allow you to specify what frame will be the root of the TF tree.
    • If unset it will default to "odom", which is the current behavior on main
    • you can set tf_root to "vision" or "body" and pass this in via config file, and those frames will become the TF root as expected. (All the other frames and transforms still exist, it just changes the layout of the tree).
  • Nothing about the odometry topic parent frame changes as the expectation is this should be handled by the preferred_odom_frame parameter. (athough it is worth noting that this can't actually be changed currently, as it is hardcoded to be "odom" in the launchfile...
    spot_robot_state_publisher_params = {"spot_name": spot_name, "preferred_odom_frame": "odom"}
    )
  • deleted some dead python code dealing with preferred_odom_frame parameter, as this was adjacent to the parameter I added. (all of this is in C++ now).

Testing Done

  • default behavior on robot unchanged
  • tested new parameter set to "odom", "vision", "body" on robot and made sure TF tree matched expectations
  • ensure object sync/ fiducials are still read as expected as some calls there changed
  • updated unit tests pass

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Signed-off-by: Katie Hughes <[email protected]>
@khughes-bdai khughes-bdai force-pushed the khughes/allow_body_to_be_root branch from fe7f0bd to c8f0410 Compare December 16, 2024 19:32
@coveralls
Copy link

coveralls commented Dec 16, 2024

Pull Request Test Coverage Report for Build 12377409593

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 2 files are covered.
  • 440 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 51.184%

Files with Coverage Reduction New Missed Lines %
spot_ros2/spot_ros2/spot_driver/spot_driver/spot_ros2.py 440 44.44%
Totals Coverage Status
Change from base Build 12186201404: -0.01%
Covered Lines: 1946
Relevant Lines: 3802

💛 - Coveralls

Katie Hughes added 2 commits December 16, 2024 17:48
@khughes-bdai khughes-bdai force-pushed the khughes/allow_body_to_be_root branch from 5b91df4 to fb22a20 Compare December 17, 2024 15:31
Signed-off-by: Katie Hughes <[email protected]>
Copy link
Collaborator

@mhidalgo-bdai mhidalgo-bdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator Author

khughes-bdai commented Dec 18, 2024

Merge activity

  • Dec 18, 9:55 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 18, 9:56 AM EST: A user merged this pull request with Graphite.

@khughes-bdai khughes-bdai merged commit 6410c75 into main Dec 18, 2024
5 checks passed
@khughes-bdai khughes-bdai deleted the khughes/allow_body_to_be_root branch December 18, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants